<div class="row">
  <%= render "menu" %>
  <div class="col-md-10">
    <div class="card card-lg">
      <div class="card-body">
        <p>
          <%= link_to "登录龙测", "/users/third_app_login/dragontesting" %>
        </p>


        <%= form_for @user, url: setting_path, method: :put, html: { enctype: "multipart/form-data" } do |f| %>
          <%= render "shared/error_messages", target: @user %>
          <input type="hidden" name="by" value="profile" />
          <% if Setting.has_profile_field? :location %>
            <div class="form-group">
              <%= f.label :location %>
              <%= f.text_field :location, class: "form-control", style: "width: 200px" %>
            </div>
          <% end %>
          <% if Setting.has_profile_field? :company %>
            <div class="form-group">
              <%= f.label :company %>
              <%= f.text_field :company, class: "form-control", style: "width: 400px" %>
            </div>
          <% end %>
          <% if Setting.has_module? :github %>
            <div class="form-group">
              <%= f.label :github %>
              <div class="input-group">
                <span class="input-group-prepend"><span class="input-group-text">https://github.com/</span></span>
                <%= f.text_field :github, class: "form-control" %>
              </div>
            </div>
          <% end %>
          <% if Setting.has_profile_field? :twitter %>
            <div class="form-group">
              <%= f.label :twitter %>
              <div class="input-group">
                <span class="input-group-prepend"><span class="input-group-text">https://twitter.com/</span></span>
                <%= f.text_field :twitter, class: "form-control" %>
              </div>
            </div>
          <% end %>
          <% if Setting.has_profile_field? :website %>
            <div class="form-group">
              <%= f.label :website %>
              <%= f.text_field :website, type: :url, class: "form-control", placeholder: "http://" %>
            </div>
          <% end %>
          <% Profile::CONTACT_FIELDS.each do |field| %>
            <% next if !Setting.has_profile_field? field
               field_prefix = Profile.contact_field_prefix(field) %>
            <div class="form-group form-group-profile-field-<%= field %>">
              <label for="user_profile_<%= field %>"><%= Profile.contact_field_label(field) %></label>
              <% if field_prefix %>
                <div class="input-group">
                  <span class="input-group-prepend"><span class="input-group-text"><%= field_prefix %></span></span>
                <% end %>
                <input class="form-control" type="text" value="<%= @user.profile_field(field) %>" name="user[profiles][<%= field %>]" id="user_profile_<%= field %>">
                <% if field_prefix %></div>
              <% end %>
            </div>
          <% end %>
          <div class="form-actions hide-ios">
            <button type="submit" class="btn btn-primary" data-disable-with="<%= t("common.saving") %>"><%= t("users.update_profile") %></button>
          </div>
        <% end %>
      </div>
    </div>
  </div>
</div>
</div>
